package com.kk.base.dao.home;

import com.kk.base.entity.home.HomeUserIdCard;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @info :  前台用户实名认证数据库处理层
 */
@Repository
public interface HomeUserIdCardDao extends JpaRepository<HomeUserIdCard,Long> {

    /**
     * 根据id查询
     * @param id
     * @return
     */
    @Query("select huic from HomeUserIdCard huic where id = :id")
    HomeUserIdCard find(@Param("id")Long id);


    /**
     * 根据所属用户查询
     * @param id
     * @return
     */
    HomeUserIdCard findByHomeUser_Id(Long id);


}
